#! /usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'

export version=${npm_package_version:-$(node -p "require('./package').version")}
versionfile=libexec/nodenv---version

perl -pi -e 's/^(version=).*$/$1$ENV{version}/' -- "$versionfile"

git add -- "$versionfile"
